package com.xfyuao;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;

import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import com.baomidou.mybatisplus.extension.plugins.pagination.optimize.JsqlParserCountOptimize;

/**
 * @author xfyuao
 * */
@SpringBootApplication
@MapperScan("com.xfyuao.mapper")
public class App {

    public static void main(String[] args) {
        SpringApplication.run(App.class, args);
    }
    @Bean//开启mybatis plus分页插件
    public PaginationInterceptor paginationInterceptor() {
        return new PaginationInterceptor().setCountSqlParser(new JsqlParserCountOptimize(true));
    }
}